package com.e3.sysmg.security.service;

import java.util.List;

import com.e3.core.base.ServiceException;
import com.e3.sysmg.security.model.ModuleModel;
import com.e3.sysmg.security.model.ModuleQC;
import com.e3.sysmg.security.model.RoleModel;
import com.e3.sysmg.security.model.RoleQC;
import com.e3.sysmg.security.model.UserModel;
import com.e3.sysmg.security.model.UserQC;

public interface SecurityQueryService {

	public ModuleModel getModuleModelByCode(String code)
			throws ServiceException;

	public ModuleModel getModuleModelById(long id) throws ServiceException;

	public List<ModuleModel> getModuleModelByCodes(String... codes)
			throws ServiceException;

	public List<ModuleModel> getModuleModelByIds(Long... ids)
			throws ServiceException;

	public List<ModuleModel> getModuleByCondition(ModuleQC moduleQC)
			throws ServiceException;

	public List<ModuleModel> getModuleChildren(ModuleModel moduleModel)
			throws ServiceException;

	public List<ModuleModel> getModulesByUserId(long userId)
			throws ServiceException;

	public long getModuleChildrenSize(ModuleModel moduleModel)
			throws ServiceException;

	public List<RoleModel> getAllRoles() throws ServiceException;

	public List<ModuleModel> getRoleModules(RoleModel roleModel)
			throws ServiceException;

	public RoleModel getRoleParents(RoleModel roleModel)
			throws ServiceException;

	public List<RoleModel> getRolesByCondition(RoleQC roleQC)
			throws ServiceException;

	public List<ModuleModel> getAllModulesOfRole(RoleModel roleModel)
			throws ServiceException;

	public List<UserModel> getUserByCondition(UserQC qc)
			throws ServiceException;
	
	public UserModel getUserByCode(String code) throws ServiceException;

}